package router

import (
	"ginstudydemo.com/main/controllers"
	"github.com/gin-gonic/gin"
)

// CategoryRouter  函数定义了 /cate 路由组及其处理函数
func CategoryRouter(r *gin.Engine) {
	rGroup := r.Group("/cate")
	{

		//递归获取分类以及分类的数据(根据分类的code)
		rGroup.GET("/recursionAndData", controllers.NewCategoryController().GetCateAndResUseRecursionByCateCode)

		// 递归获取分类
		rGroup.GET("/recursion", controllers.NewCategoryController().GetCateUseRecursionByCateCode)

	}

}
